/*
* Sun Public License Notice
*
* The contents of this file are subject to the Sun Public License
* Version 1.0 (the "License"). You may not use this file except in
* compliance with the License. A copy of the License is available at
* http://www.sun.com/
*
* The Original Code is NetBeans. The Initial Developer of the Original
* Code is Sun Microsystems, Inc. Portions Copyright 1997-2001 Sun
* Microsystems, Inc. All Rights Reserved.
*/
package org.netbeans.modules.rmi.registry;
/**
*
* @author
* @version
*/
public class RegistryPanel extends javax.swing.JPanel {
/** Serial version UID. */
static final long serialVersionUID = -4885634530381950563L;
/** Initializes the Form. */
public RegistryPanel() {
initComponents ();
localizeComponents ();
}
/** Localize components.
*/
protected void localizeComponents() {
java.util.ResourceBundle bundle = org.openide.util.NbBundle.getBundle(RegistryPanel.class);
jLabel1.setText (bundle.getString("LAB_Host")); // NOI18N
jLabel2.setText (bundle.getString("LAB_Port")); // NOI18N
jCheckBox1.setText (bundle.getString("LAB_CreateRegistry")); // NOI18N
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the FormEditor.
*/
private void initComponents () {//GEN-BEGIN:initComponents
jLabel1 = new javax.swing.JLabel ();
jLabel2 = new javax.swing.JLabel ();
jTextField2 = new javax.swing.JTextField ();
jTextField3 = new javax.swing.JTextField ();
jCheckBox1 = new javax.swing.JCheckBox ();
setLayout (new java.awt.GridBagLayout ());
java.awt.GridBagConstraints gridBagConstraints1;
setPreferredSize (new java.awt.Dimension(320, 100));
setBorder (new javax.swing.border.EmptyBorder(new java.awt.Insets(8, 8, 8, 8)));
jLabel1.setText ("Host");
gridBagConstraints1 = new java.awt.GridBagConstraints ();
gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL;
add (jLabel1, gridBagConstraints1);
jLabel2.setText ("Port");
gridBagConstraints1 = new java.awt.GridBagConstraints ();
gridBagConstraints1.gridwidth = 0;
gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints1.insets = new java.awt.Insets (0, 8, 0, 0);
add (jLabel2, gridBagConstraints1);
jTextField2.addActionListener (new java.awt.event.ActionListener () {
public void actionPerformed (java.awt.event.ActionEvent evt) {
jTextField2ActionPerformed (evt);
}
}
);
gridBagConstraints1 = new java.awt.GridBagConstraints ();
gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints1.weightx = 1.0;
add (jTextField2, gridBagConstraints1);
jTextField3.setAlignmentX (0.0F);
jTextField3.setPreferredSize (new java.awt.Dimension(42, 20));
jTextField3.setText ("1099");
jTextField3.addActionListener (new java.awt.event.ActionListener () {
public void actionPerformed (java.awt.event.ActionEvent evt) {
jTextField3ActionPerformed (evt);
}
}
);
gridBagConstraints1 = new java.awt.GridBagConstraints ();
gridBagConstraints1.gridwidth = 0;
gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints1.insets = new java.awt.Insets (0, 8, 0, 0);
add (jTextField3, gridBagConstraints1);
jCheckBox1.setHorizontalTextPosition (javax.swing.SwingConstants.LEFT);
jCheckBox1.setText ("Create new local registry");
jCheckBox1.setHorizontalAlignment (javax.swing.SwingConstants.RIGHT);
jCheckBox1.addActionListener (new java.awt.event.ActionListener () {
public void actionPerformed (java.awt.event.ActionEvent evt) {
jCheckBox1ActionPerformed (evt);
}
}
);
gridBagConstraints1 = new java.awt.GridBagConstraints ();
gridBagConstraints1.gridwidth = 0;
gridBagConstraints1.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints1.insets = new java.awt.Insets (8, 0, 0, 0);
add (jCheckBox1, gridBagConstraints1);
}//GEN-END:initComponents
private void jTextField3ActionPerformed (java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField3ActionPerformed
// Add your handling code here:
}//GEN-LAST:event_jTextField3ActionPerformed
private void jTextField2ActionPerformed (java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField2ActionPerformed
// Add your handling code here:
}//GEN-LAST:event_jTextField2ActionPerformed
private void jCheckBox1ActionPerformed (java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox1ActionPerformed
// Add your handling code here:
if (jCheckBox1.isSelected()) {
jTextField2.setText(RegistryItem.LOCALHOST);
jTextField2.setEnabled(false);
} else {
jTextField2.setEnabled(true);
}
}//GEN-LAST:event_jCheckBox1ActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JTextField jTextField2;
private javax.swing.JTextField jTextField3;
private javax.swing.JCheckBox jCheckBox1;
// End of variables declaration//GEN-END:variables
public String getPort() {
return jTextField3.getText();
}
public String getHost() {
return jTextField2.getText();
}
public boolean isCreateRequired() {
return jCheckBox1.isSelected();
}
}
/*
* <<Log>>
* 5 Gandalf-post-FCS1.2.1.1 3/20/00 Martin Ryzl localization
* 4 Gandalf-post-FCS1.2.1.0 3/2/00 Martin Ryzl local registry control
* added
* 3 Gandalf 1.2 11/27/99 Patrik Knakal
* 2 Gandalf 1.1 10/23/99 Ian Formanek NO SEMANTIC CHANGE - Sun
* Microsystems Copyright in File Comment
* 1 Gandalf 1.0 8/27/99 Martin Ryzl
* $
*/